<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>地图导航</title>
<style type="text/css">
*{
    margin:0px;
    padding:0px;
}
body, button, input, select, textarea {
    font: 12px/16px Verdana, Helvetica, Arial, sans-serif;
}
#container{
  min-width:600px;
  min-height:767px;
  }
</style>
<script charset="utf-8" src="http://map.qq.com/api/js?v=2.exp&libraries=convertor"></script>
<script>
function getLocation(){
  //判断是否支持 获取本地位置
  if (navigator.geolocation)
    {
    navigator.geolocation.getCurrentPosition(showPosition);
    }
  else{x.innerHTML="浏览器不支持定位.";}
  }
function showPosition(position)
  {
var lat=position.coords.latitude; 
var lng=position.coords.longitude;
//调用地图命名空间中的转换接口   type的可选值为 1:gps经纬度，2:搜狗经纬度，3:百度经纬度，4:mapbar经纬度，5:google经纬度，6:搜狗墨卡托
qq.maps.convertor.translate(new qq.maps.LatLng(lat,lng), 1, function(res){
  //取出经纬度并且赋值
     latlng = res[0];
  
  var map = new qq.maps.Map(document.getElementById("container"),{
        center:  latlng,
        zoom: 13
    });
    //设置marker标记
   var marker = new qq.maps.Marker({
            map : map,
            position : latlng
        });
    });
  }
</script>

</head>
<body onload="getLocation()">
<p>用html5定位后，使用腾讯地图坐标转换接口纠偏，请允许获取位置。</p>
<div id="container"></div>

</body>
</html>